# Contributor: Thiago Perrotta <tbperrotta@gmail.com>
# Maintainer: Thiago Perrotta <tbperrotta@gmail.com>
pkgname=py3-minidb
pkgver=2.0.5
pkgrel=0
pkgdesc="Simple SQLite3 store for Python objects"
url="https://thp.io/2010/minidb"
arch="noarch"
license="ISC"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-doc"
source="https://files.pythonhosted.org/packages/source/m/minidb/minidb-$pkgver.tar.gz"
builddir="$srcdir/minidb-$pkgver/"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH=. pytest
}

package() {
	python3 setup.py install --root="$pkgdir" --optimize=1 --skip-build

	install -d "$pkgdir/usr/share/licenses/$pkgname"
	sed -n '/# Copyright/,/OF THIS SOFTWARE./p' minidb.py > "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

sha512sums="
889e678a99c7a5dff5ae7ae2c3540e978f09616384450934f2f16797a3a06c9d863b57eced4b2cde0a4bdfa4923b754e473bde0905c86d948d3bdb81a8e6dbad  minidb-2.0.5.tar.gz
"
